package com.baseframe.system.feign;

import com.baseframe.common.constant.BaseLauncherConstant;
import com.baseframe.system.entity.BasePermission;
import com.baseframe.system.entity.BaseRole;
import com.baseframe.system.entity.vo.BaseRoleVO;
import com.baseframe.tool.result.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(BaseLauncherConstant.SYSTEM_SERVICE)
public interface BaseSystemFeign {
    public static String API = "/feign-api/"+ BaseLauncherConstant.SYSTEM_SERVICE;
    @GetMapping(API+"/find/permissions-by-role-id")
    public R<List<BasePermission>> findPermissionListByRoleId(@RequestParam("roleId") Long roleId);

    @GetMapping(API+"/find/role-by-role-name")
    public R<BaseRoleVO> findRoleIdByRoleName(@RequestParam("roleName") String roleName);
}
